418d7a2827cc4a57916036c35737ffd7afddbe98,src/main/java/org/zalando/intellij/swagger/validator/value/ReferenceValidator.java,ReferenceValidator,validateResponseReference,#String#Set#PsiElement#AnnotationHolder#,35
Before Change
final Set<String> availableResponses,
final PsiElement psiElement,
final AnnotationHolder annotationHolder) {
final boolean responseFound = availableResponses.contains(refValue);
if (!responseFound) {
annotationHolder.createErrorAnnotation(psiElement, "Response not found");
}
}
}
After Change
void validateResponseReference(final PsiElement psiElement,
final AnnotationHolder annotationHolder) {
if (!isFileRef(psiElement)) {
final boolean responseFound =
getAvailableResponses(psiElement)
.contains(referenceValueExtractor.getValue(psiElement.getText()));
if (!responseFound) {
final Annotation errorAnnotation = annotationHolder.createErrorAnnotation(psiElement, "Response not found");
errorAnnotation.registerFix(intentionAction);
}
}
}